<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>商品列表</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            var tt=$("#tt").val();
            $("#searchForm").attr("action", "${ctx}/sys/tbShopController/showAgentProduct/"+tt);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="#">商品列表</a></li>
</ul>
<form:form id="searchForm" modelAttribute="tbProductt" action="${ctx}/sys/tbShopController/showAgentProduct/${tbProductt.reserveFlag}"
           method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="tt" name="reserveFlag" type="hidden" value="${tbProductt.reserveFlag}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
   <label>商品名称：</label>
    <form:input path="title" htmlEscape="false" maxlength="50" class="input-medium"/>
    &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/><br/>
<sys:message content="${message}"/>

</form:form>
<span><font style="color: #00A6C7">${message1}</font></span>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
        <tr>
            <th>商品标题</th>
            <th>属性</th>
            <th>价格</th>
            <th>排序</th>
            <th>条形码</th>
            <th>预定时间</th>
            <th>是否可用物业钱包</th>
            <th>最后操作时间</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="tbProduct">

                    <tr>
                        <td>${tbProduct.title}</td>
                        <td>${tbProduct.attr}</td>
                        <td>${tbProduct.wholesalePrice}</td>
                        <td>${tbProduct.proSort}</td>
                        <td>${tbProduct.barcode}</td>
                        <td>${tbProduct.reserveStartTime01} 至 ${tbProduct.reserveEndTime01}</td>
                        <td><c:if test="${tbProduct.isUseMqWallet==0}">否</c:if><c:if test="${tbProduct.isUseMqWallet==1}">是</c:if></td>
                        <td>${tbProduct.updateTimeStr}</td>
                        <td>
                            <c:if test="${tbProduct.flag==0}">
                                <a href="${ctx}/sys/product/storage?id=${tbProduct.id}&reserveFlag=${tbProductt.reserveFlag}">签约</a>
                            </c:if>
                            <c:if test="${tbProduct.flag==1}">
                                <a href="${ctx}/sys/product/storageOut?id=${tbProduct.id}&attr=${tbProduct.attr}&reserveFlag=${tbProductt.reserveFlag}">解约</a>
                            </c:if>
                        </td>
                    </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>
